using System;
using System.Data;
using WP.Commons;

namespace WP.MF.DataEntity
{
    //=========MCounty  ============================
    [System.ComponentModel.DesignerCategory("Code")]
    public class MCountyDEL : DataSet, IDataEntity
    {
        //=========MCounty ============================
        public const string TABLENAME_MCOUNTY = "MCounty";
        public const string RECID      = "RecId";
        public const string RECSTAMP   = "RecStamp";
        public const string COUNTYNO   = "CountyNo";
        public const string COUNTYDESC = "CountyDesc";
        public const string PROVNO     = "ProvNo";
        public const string TAXPCT     = "TaxPct";
        public const string SHORTDESC  = "ShortDesc";
        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public MCountyDEL()
        {
            //CreateMCounty structure
            CreateMCountyStructure();
        }


        private void CreateMCountyStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC;
            table = new DataTable(TABLENAME_MCOUNTY);
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DCC.Add(DC);

            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(COUNTYNO, typeof(System.String));
            DC.MaxLength = 4;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(COUNTYDESC, typeof(System.String));
            DC.MaxLength = 20;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(PROVNO, typeof(System.String));
            DC.MaxLength = 5;
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TAXPCT, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(SHORTDESC, typeof(System.String));
            DC.MaxLength = 10;
            DC.DefaultValue = "";
            DCC.Add(DC);

            this.Tables.Add(table);
        }

    }
}
